

<?php $this->load->view('common/header') ?>


<div class="container">
  <div class="row-fluid diannaoduan">
      <?php foreach ($list as $key => $value):?>
          <div class="thumbnail col-md-3">
            <img alt="300x200" src="/data/image/<?php echo $value->face ?>"/>
            <div class="caption">
              <h4>
                <?php echo $value->title ?>
              </h4>
              <p>
                <?php echo $value->introduce ?>
              </p>
              <p>
                <a class="btn btn-primary" href="#">浏览</a> <a class="btn" href="#">分享</a>
              </p>
            </div>
          </div>
      <?php endforeach; ?>
  </div>
  <div class="row-fluid shoujiduan">
    <ul class="col-md-12">
      <?php foreach ($list as $key => $value):?>
        <li class="col-md-3">
          <div class="thumbnail">
            <img alt="300x200" src="/data/image/<?php echo $value->face ?>"/>
            <div class="caption">
              <h5><b>
                <a href="<?php echo site_url().'/blog/view/'.$value->id ?> "><?php echo $value->title ?></a>
              </b></h5>
              <p>
                <?php echo $value->introduce ?>
              </p>
            </div>
          </div>
        </li>
      <?php endforeach; ?>
    </ul>
  </div>
  <div class="row-fluid">
    <?php foreach ($list as $key => $value):?>
      <div class="media col-md-6">
         <a href="#" class="pull-left"><img src="<?php echo base_url() ?>data/image/<?php echo $value->face ?>" width=100 class="media-object" alt='' /></a>
        <div class="media-body">
          <h4 class="media-heading">
            <?php echo $value->title ?>
          </h4> 
          <?php echo $value->introduce ?>
        </div>
      </div>
    <?php endforeach; ?>
  </div>

</div>

<script>
$(function(){
  function browserRedirect() {
      var sUserAgent = navigator.userAgent.toLowerCase();
      var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
      var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
      var bIsMidp = sUserAgent.match(/midp/i) == "midp";
      var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
      var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
      var bIsAndroid = sUserAgent.match(/android/i) == "android";
      var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
      var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
      if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) ){
          $('.diannaoduan').hide();
          // window.location.href="http://www.qq.com";
      }else{
          $('.shoujiduan').hide();
          // window.location.href="http://wap.yy.com";
      }
  }
  browserRedirect();
});


</script>

<?php $this->load->view('common/footer') ?>